package top.minuy.structure.graph.mst;

import top.minuy.res.graph.GraphRes;
import top.minuy.structure.graph.representations.table.WeightedGraph;

/**
 * 最小生成树算法测试
 *
 * @author Minuy
 * @time 16:48
 * @date 2021/11/25
 */
public class Test {
    public static void main(String[] args) {
        System.out.println("Kruskal 最小生成树算法：");
        WeightedGraph g = new WeightedGraph(GraphRes.G_KRUSKAL_1);
        Kruskal kruskal = new Kruskal(g);
        System.out.println(kruskal);

        System.out.println("Prim 最小生成树算法：");
        Prim prim = new Prim(g);
        System.out.println(prim);

        System.out.println("Prim 最小生成树优先队列优化算法：");
        PrimPQ pp = new PrimPQ(g);
        System.out.println(pp);


//        Integer[] s = {6,4,23,4,3,2,123,4,532,154,3,543,6,34,5,43,2,4,54,2};
//        PriorityQueueMin<Integer> pqm = new PriorityQueueMin<>();
//        for (Integer a:s)
//        pqm.enqueue(a);
//
//        for (int i=0;i<s.length;i++){
//            System.out.print(pqm.dequeue()+" ");
//        }
    }
}
